﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.BLL;
using Grove.ORM;
using HZ.MBSM.Model;
using HZ.MBSM.DBUtility;

public partial class Agency_Agentinfo: System.Web.UI.Page, IPageDescribe
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (HZ.MBSM.BLL.Login.CheckAssert(this.UseAccountType))
        {
            InitPage();
        }
        else
        {


        }
    }
    
     
    private void InitPage()
    {
        
        HZ.MBSM.DBUtility.Db db = new HZ.MBSM.DBUtility.Db(false);
        Grove.ORM.ObjectOperator oo = db.GetObjectOperator();
        HZ.MBSM.Model.Attorney attorney = (HZ.MBSM.Model.Attorney)oo.Retrieve(typeof(HZ.MBSM.Model.Attorney), ((HZ.MBSM.Model.Account)(Session["Account"])).AccountId.ToString());
        AttorneyName.Text = attorney.AttorneyName;
        Address.Text = attorney.Address;
        PostCode.Text = attorney.PostCode;
        Telephone.Text = attorney.Telephone;
        registDate.Text = attorney.registDate.Year == 1 ? "" : attorney.registDate.ToShortDateString();
        
        //PostCode.Text =

        oo.Dispose();
    }

    #region IPageDescribe 成员

    public string Name
    {
        get { return "用户基本信息"; }
    }

    public string Describe
    {
        get { return ""; }
    }

    public string ParentName
    {
        get { return "用户基本信息"; }
    }

    public System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> UseAccountType
    {
        get
        {
            System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
            _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAttorney);
            return _AccountType;
        }
    }

    #endregion
    protected void AttorneyName_TextChanged(object sender, EventArgs e)
    {

    }
}
